package com.medi.chats;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;

@EnableRedisHttpSession
@SpringBootApplication
@EnableCaching
@MapperScan("com.medi.chats.dao")
public class ChatsApplication {

    public static void main(String[] args) {
        SpringApplication application = new SpringApplication(ChatsApplication.class);
//        SpringApplication.run(ChatsApplication.class, args);
//        application.addListeners(new CheckListener());
        application.run(args);
    }


    //CORS
//    @Override
//    public void addCorsMappings(CorsRegistry registry) {
//        registry.addMapping("/api/**").allowedMethods("*").allowedOrigins("*");
//        registry.addMapping("/page/**");
//        registry.addMapping("/css/**");
//        registry.addMapping("/js/**");
//        registry.addMapping("/font-awesome-4.7.0/**");
//        registry.addMapping("/fonts/**");
//        registry.addMapping("/images/**");
//    }
}
